#include<stdio.h>
#pragma warning(disable:4996)
int main()
{
	int cm;
	scanf("%d", &cm);
	int foot = cm / 30.48;
	int inch = ((cm / 30.48) - foot)*12;
	return 0;

}
